﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using System.Collections.Generic;

using My.ELibrary.Model.Catalog;
using My.ELibrary.Business.Catalog;

public partial class Catalog_BookList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["id"] != null && Request.QueryString["id"].ToString() != string.Empty)
            {
                 ElibResBookModel obj = new ElibResBookModel();
                 obj = ElibResBookBLL.GetInstance().SelectOne(int.Parse(Request.QueryString["id"]));
                 this.lblCatalog.Text = obj.Subject;
            }

        }
    }
    /// <summary>
    /// 
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        List<ElibResBookModel> list = new List<ElibResBookModel>();
        list = ElibResBookBLL.GetInstance().GetElibByTitle(txtSearch.Text.Trim());
        this.DataList1.DataSource = list;
        this.DataList1.DataBind();
    }
}
